function homework1plotting()
%display dependence on number of antennas (vary nt and nr together and separately)
%display dependence on signal to noise ratio
%display dependence on correlation

ergo=0;
outage=0;
nt=[2 4 8];
nr=[2 4 8];
correl1=0;
correl2=0;
snr_db=0:5:30;
large_number=100;
outage_r=.05;
[ergo,outage]=homework1(nr,nt,correl1,correl2,snr_db,large_number,outage_r);

figure;
plot(snr_db,ergo(1,:),'b-',snr_db,ergo(2,:),'c-',snr_db,ergo(3,:),'r-');
legend('nt=nr=2', 'nt=nr=4', 'nt=nr=8');
xlabel('Signal to Noise Ratio (dB)');
ylabel('Ergodic Capacity');
title('Ergodic Capacity vs SNR for Correlation=0');

figure;
plot(snr_db,ergo(1,:),'b-',snr_db,ergo(2,:),'c-',snr_db,ergo(3,:),'r-');
legend('nt=nr=2', 'nt=nr=4', 'nt=nr=8');
xlabel('Signal to Noise Ratio (dB)');
ylabel('Outage Capacity');
title('Outage Capacity vs SNR for Correlation=0');




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ergo=0;
outage=0;

nt=1:8;
nr=1:8;
correl1=0;
correl2=0;
snr_db=10;
large_number=100;
outage_r=.05;
for a=1:length(nr)
	[e,o]=homework1(nr(a),nt(a),correl1,correl2,snr_db,large_number,outage_r);
	ergo(1,a)=e;
	outage(1,a)=o;
end

nt=[4 4 4 4 4 4 4 4];
nr=1:8;
correl1=0;
correl2=0;
snr_db=10;
large_number=100;
outage_r=.05;
for a=1:length(nr)
	[e,o]=homework1(nr(a),nt(a),correl1,correl2,snr_db,large_number,outage_r);
	ergo(2,a)=e;
	outage(2,a)=o;
end

nr=[4 4 4 4 4 4 4 4];
nt=1:8;
correl1=0;
correl2=0;
snr_db=10;
large_number=100;
outage_r=.05;
for a=1:length(nr)
	[e,o]=homework1(nr(a),nt(a),correl1,correl2,snr_db,large_number,outage_r);
	ergo(3,a)=e;
	outage(3,a)=o;
end


figure;
plot(nt,ergo(1,:),'b-',nt,ergo(2,:),'c-',nt,ergo(3,:),'r-');
legend('nt=nr=n', 'nt=4, nr=n', 'nt=n, nr=4');
xlabel('Number of Antennas (n)');
ylabel('Ergodic Capacity');
title('Ergodic Capacity vs n for Correlation=0 and SNR=10dB');

figure;
plot(nt,outage(1,:),'b-',nt,outage(2,:),'c-',nt,outage(3,:),'r-');
legend('nt=nr=n', 'nt=4, nr=n', 'nt=n, nr=4');
xlabel('Number of Antennas (n)');
ylabel('Outage Capacity');
title('Outage Capacity vs n for Correlation=0 and SNR=10dB');


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ergo=0;
outage=0;

nr=4;
nt=4;
correl1=0:.1:.6;
correl2=0:.1:.6;
snr_db=30;
large_number=300;
outage_r=.05;
for a=1:length(correl1)
	[e,o]=homework1(nr,nt,correl1(a),correl2(a),snr_db,large_number,outage_r);
	ergo(a)=e;
	outage(a)=o;
end

figure;
plot(correl1,ergo,'g-');
xlabel('Correlation at Receiver and Transmitter');
ylabel('Ergodic Capacity');
title('Ergodic Capacity vs Correlation for n=4 and SNR=10dB');

figure;
plot(correl1,outage,'g-');
xlabel('Correlation at Receiver and Transmitter');
ylabel('Outage Capacity');
title('Outage Capacity vs Correlation for n=4 and SNR=10dB');
